package com.health.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.health.system.dto.AuthorizationResourceDTO;
import com.health.system.dto.ResourceTreeListDTO;
import com.health.system.entity.Resource;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface ResourceMapper extends BaseMapper<Resource> {

    /**
     * 查询资源关联的角色
     *
     * @return  /
     */
    List<AuthorizationResourceDTO> selectResourcesAndRoles();

    /**
     * 查询资源列表
     *
     * @return /
     */
    List<ResourceTreeListDTO> selectAll();

    /**
     * 删除资源关联角色
     *
     * @param id 资源id
     */
    void deleteRelationRole(@Param("id") Long id);
}
